<template>
  <div class="waston">
    <form name='pushMsgFm' report-submit @submit='orderSign' class="tepForm"  v-if="!code_value">   
        <button form-type="submit"  class="commit" @click="showBtn">
            立即购买
        </button>  
        
    </form>
    <div v-else class="qrcode_wrapper">
      <img :src="qrCodeUrl" class="qrcode" >
    </div>
    
  </div>
</template>

<script>

export default {
  data () {
    return {
      a:''
    }
  },
  methods: {
    async showBtn(){
       wx.navigateToMiniProgram({
        appId: 'wxc89a988f9f3d1fad',
        path: 'pages/goods/index?item_uid=11_29915',
        // extraData: {
        //   foo: 'bar'
        // },
        envVersion: 'release',
        success(res) {
          // 打开成功
          console.log('成功打开')
        }
      })
    }
  },
  onShow(){
  }

}
</script>
<style lang="scss" scoped>
  .waston{
    width:100%;
    height: 100%;  
    background:url('http://file.rzkeji.com/web/f6/game/exchange.png');
    background-size: 100% 100%;
  }
  .commit{
    width:120px;
    height: 40px;
    background: #fff;
    position: relative;
  }
  .tepForm{
    position: relative;
    top:500px
    // bottom: 50px;
  }

</style>
